}
static void
-draw_shadow (cairo_t *cr,
- gboolean inset,
- const GskRoundedRect*box,
- const GskRoundedRect*clip_box,
- float radius,
- const GdkRGBA *color,
- GskBlurFlags blur_flags)
+draw_shadow (cairo_t *cr,
+ gboolean inset,
+ const GskRoundedRect *box,
+ const GskRoundedRect *clip_box,
+ float radius,
+ const GdkRGBA *color,
+ GskBlurFlags blur_flags)
{
cairo_t *shadow_cr;
/* First do the corners of box */
for (i = 0; i < 4; i++)
- {
- cairo_save (cr);
+ {
+ cairo_save (cr);
/* Always clip with remaining to ensure we never draw any area twice */
gdk_cairo_region (cr, remaining);
cairo_clip (cr);
- draw_shadow_corner (cr, TRUE, &box, &clip_box, self->blur_radius, &self->color, i, &r);
- cairo_restore (cr);
+ draw_shadow_corner (cr, TRUE, &box, &clip_box, self->blur_radius, &self->color, i, &r);
+ cairo_restore (cr);
- /* We drew the region, remove it from remaining */
- cairo_region_subtract_rectangle (remaining, &r);
- }
+ /* We drew the region, remove it from remaining */
+ cairo_region_subtract_rectangle (remaining, &r);
+ }
/* Then the sides */
for (i = 0; i < 4; i++)
- {
- cairo_save (cr);
+ {
+ cairo_save (cr);
/* Always clip with remaining to ensure we never draw any area twice */
gdk_cairo_region (cr, remaining);
cairo_clip (cr);
- draw_shadow_side (cr, TRUE, &box, &clip_box, self->blur_radius, &self->color, i, &r);
- cairo_restore (cr);
+ draw_shadow_side (cr, TRUE, &box, &clip_box, self->blur_radius, &self->color, i, &r);
+ cairo_restore (cr);
- /* We drew the region, remove it from remaining */
- cairo_region_subtract_rectangle (remaining, &r);
- }
+ /* We drew the region, remove it from remaining */
+ cairo_region_subtract_rectangle (remaining, &r);
+ }
/* Then the rest, which needs no blurring */
/* First do the corners of box */
for (i = 0; i < 4; i++)
- {
- cairo_save (cr);
+ {
+ cairo_save (cr);
/* Always clip with remaining to ensure we never draw any area twice */
gdk_cairo_region (cr, remaining);
cairo_clip (cr);
- draw_shadow_corner (cr, FALSE, &box, &clip_box, self->blur_radius, &self->color, i, &r);
- cairo_restore (cr);
+ draw_shadow_corner (cr, FALSE, &box, &clip_box, self->blur_radius, &self->color, i, &r);
+ cairo_restore (cr);
- /* We drew the region, remove it from remaining */
- cairo_region_subtract_rectangle (remaining, &r);
- }
+ /* We drew the region, remove it from remaining */
+ cairo_region_subtract_rectangle (remaining, &r);
+ }
/* Then the sides */
for (i = 0; i < 4; i++)
- {
- cairo_save (cr);
+ {
+ cairo_save (cr);
/* Always clip with remaining to ensure we never draw any area twice */
gdk_cairo_region (cr, remaining);
cairo_clip (cr);
- draw_shadow_side (cr, FALSE, &box, &clip_box, self->blur_radius, &self->color, i, &r);
- cairo_restore (cr);
+ draw_shadow_side (cr, FALSE, &box, &clip_box, self->blur_radius, &self->color, i, &r);
+ cairo_restore (cr);
- /* We drew the region, remove it from remaining */
- cairo_region_subtract_rectangle (remaining, &r);
- }
+ /* We drew the region, remove it from remaining */
+ cairo_region_subtract_rectangle (remaining, &r);
+ }
/* Then the rest, which needs no blurring */